package com.media.selector.media.loader

import android.net.Uri
import android.widget.ImageView
import androidx.annotation.NonNull
import androidx.annotation.Nullable

/**
 * date        ：2020/5/19
 * author      ：蒙景博
 * description ：
 */
class MediaProxyLoader constructor(val loader: IMediaSelecterLoader?) {

    private var mUri: Uri? = null

    fun load(@Nullable uri: Uri?): MediaProxyLoader {
        this.mUri = uri
        return this
    }

    /**
     * Load thumbnail of a static image resource.
     */
    fun thumbnail(@NonNull imageView: ImageView) {
        this.loader?.loadThumbnail(mUri, imageView)
    }

    /**
     * Load a static image resource.
     */
    fun image(@NonNull imageView: ImageView) {
        this.loader?.loadImage(mUri, imageView)
    }
}